package com.chejianer.phone.service;


import com.chejianer.phone.domain.CreateAccid;
import com.chejianer.phone.domain.CreatePhoneLine;
import org.springframework.stereotype.Service;

/**
 * Created by Chejianer on 2016/8/25.
 */
@Service
public class PhoneLinkServiceImpl implements PhoneLinkService {
    @Override
    public String toLinkPhone(String callerAcc,String caller,String callee) {

        try {
            //CreateAccid.CreateAccid();
            return CreatePhoneLine.PhonePost(callerAcc,caller,callee);
        }catch (Exception e){
            e.printStackTrace();
            return "error";
        }

    }

    @Override
    public String toCreateAccid(String accid) {
        try {
            return CreateAccid.createId(accid);
        }catch (Exception e){
            e.printStackTrace();
            return "error";
        }
    }


}
